#pragma once

namespace LSH
{

class VertexBuffer
{
public:
    VertexBuffer(void);
    ~VertexBuffer(void);
public:
    void create(UINT size, UINT count, DWORD d3dFVF);

    void* lock(UINT size=0);
    void unlock();

    void map(void* pVertices, UINT size);
public:
    void SetAsStreamSource();
protected:
    UINT        _size;
    UINT        _count;

    DWORD       _d3dFVF;
    IDirect3DVertexBuffer9* _pD3dVB;
};

} // LSH
